home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / earcd / util / dir / managers.lha / Managers / Dir / Dir.lha < prev    next >
Text File  |  1997-01-15  |  1KB  |  73 lines

  1. G4C
  2.  
  3.  
  4. WinBig -1 -1 500 45 'Pack selected files/dirs to :'
  5. WinType 11110001
  6. Box 0 0 0 0 out button
  7.  
  8. xOnLoad
  9. gosub dir.lha startup
  10.  
  11. xOnReload
  12. gosub dir.lha startup
  13.  
  14. xRoutine StartUp
  15. setscreen dir.lha $lv_fmscreen
  16. setvar  lha_id   $$LV_ID
  17. setvar  lha_dir  $$LV_DIR
  18. setvar  old_dir  $$CURRENT_DIR
  19. cd $lha_dir
  20. lvmulti dir.gc  $lha_id  first
  21. if $lv_file = ""
  22.    ezreq "LHA:\nChoose some files first\nwhy don't you ?" OK ""
  23.    guiquit dir.lha
  24.    stop
  25. endif
  26. guiopen dir.lha
  27.  
  28. xOnOpen
  29. setgad dir.lha 2 ON
  30.  
  31. xOnClose
  32. guiquit dir.lha
  33.  
  34. xOnQuit
  35. cd $old_dir
  36. delvar lha_#?
  37.  
  38. xOnFail
  39. guiwindow dir.lha resume
  40.  
  41. ;========================= Gadgets
  42.  
  43. xTextIn  5 2 490 20 "" lha_string "RAM:MyArc.lha" 130
  44. gadid 2
  45.  
  46. xbutton 10 25 100 15 "Pack"
  47. setvar lha_pack 'c:lha -r -x a $lha_string'
  48. while $lv_file > ""
  49.     extract lv_file file lha_file
  50.     appvar  lha_pack ' $lha_file'
  51.     lvmulti dir.gc $lha_id next
  52. endwhile
  53. setwintitle dir.lha "Packing files..."
  54. LAUNCH 1 '$lha_pack'
  55. guiwindow dir.lha wait
  56.  
  57.  
  58. xOnReturn 1
  59. guiwindow dir.lha resume
  60. guiquit dir.lha
  61.  
  62.  
  63. xbutton 140 25 100 15 "Browse.."
  64. setvar lha_req ""
  65. ReqFile   -1 -1 300 -40 'Destination archive:' SAVE lha_string RAM:
  66. if $lha_req > ""
  67.    update dir.lha 2 $lha_req
  68. endif
  69.  
  70.  
  71. xButton 390 25 100 15 CANCEL
  72. GuiQuit dir.lha
  73.